﻿using Nuwanda.Common;
using System.Drawing;
using System.Windows.Forms;
using System.Diagnostics;

namespace Nuwanda.TfsSpotlight.Shell
{
    /// <summary>Describes shell window layout</summary>
    [Author("Bartłomiej Legiędź")]
    public class ShellLayoutState
    {
        /// <summary>Location of the shell window</summary>
        public Point Location { [DebuggerStepThrough] get; set; }

        /// <summary>Size of the shell window</summary>
        public Size Size { [DebuggerStepThrough] get; set; }

        /// <summary>State of the shell window</summary>
        public FormWindowState WindowState { [DebuggerStepThrough] get; set; }

        /// <summary>Width of the projects panel</summary>
        public int ProjectsPaneWith { [DebuggerStepThrough] get; set; }

        /// <summary>State of the projects panel</summary>
        public bool ProjectPaneExpanded { [DebuggerStepThrough] get; set; }

        /// <summary>Width of the history panel</summary>
        public int HistoryPaneWith { [DebuggerStepThrough] get; set; }

        /// <summary>State of the history panel</summary>
        public bool HistoryPaneExpanded { [DebuggerStepThrough] get; set; }

        public ShellLayoutState()
        {
            ProjectPaneExpanded = true;
            ProjectsPaneWith = 250;
            HistoryPaneExpanded = true;
            HistoryPaneWith = 250;
        }

        public ShellLayoutState(
            Point location, Size size, FormWindowState windowState,
            int projectsPaneWidth, bool projectsPaneExpanded,
            int historyPaneWidth, bool historyPaneExpanded)
        {
            this.Location = location;
            this.Size = size;
            this.WindowState = windowState;
            this.ProjectsPaneWith = projectsPaneWidth;
            this.ProjectPaneExpanded = projectsPaneExpanded;
            this.HistoryPaneWith = historyPaneWidth;
            this.HistoryPaneExpanded = historyPaneExpanded;
        }
    }
}